﻿#pragma once
#include <QObject>

class ApiCommand : public QObject
{
    Q_OBJECT

public:
    ApiCommand(QObject*parent = Q_NULLPTR);

    int execute();

protected:
    int Api_WritePrivateProfileString();
    int Api_GetPrivateProfileString();

    int Api_RegSetValue();
    int Api_RegQueryValue();

    int Api_Sleep();

    int Api_GetProcessIdByFullName();
    int Api_GetProcessIdByPathStartWith();

    int Api_KillProcessByPID();
    int Api_KillProcessByFullName();
    int Api_KillProcessByPathStartWith();
private:

    int WritePrivateProfileStringAC(QString strGroup, QString strKey, QString strValue, QString strFile);
    int GetPrivateProfileStringAC(QString strGroup, QString strKey, QString strDefault, QString strFile);

    int KillProcessByPidAC(QStringList listPID);
};
